package com.wp.admin.controller;

import com.wp.admin.pojo.SysUserToken;
import com.wp.admin.service.SysUserTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @author wp
 * @create 2019-03-04 10:29
 */
@RestController
@RequestMapping("userToken")
public class SysUserTokenController {

    @Autowired
    private SysUserTokenService sysUserTokenService;

    @ApiIgnore
    @GetMapping("/findByToken")
    public SysUserToken findByToken(@RequestParam String token){
        return sysUserTokenService.findByToken(token);
    }

}
